package turtle.system.invest.evaluate;

import java.io.PrintWriter;

import org.osite.xml.XmlConstructor;
import org.osite.xml.XmlParam;

import turtle.system.invest.Environment;
import turtle.system.invest.rule.InvestRunnable;

public class CloseFile implements InvestRunnable {

	private String id;
	
	@XmlConstructor
	public CloseFile(@XmlParam("id") String id) {
		this.id = id;
	}
	
	@Override
	public void run(Environment environment) {
		PrintWriter writer = environment.get(id);
		writer.close();
	}
}
